package com.ship.contract.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ship.contract.bean.SpInformation;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SpInformationMapper extends BaseMapper<SpInformation> {

    @Select("SELECT * FROM sp_information")
    List<SpInformation> getAllShipImo();

    @Select("SELECT name_of_vessel FROM sp_information")
    List<SpInformation> getAllShipName();

    @Select("SELECT imo FROM sp_information WHERE name_of_vessel = #{vesselName}")
    String getImoByVesselName(@Param("id") String vesselName);
}
